<#--
/****************************************************
 * Description: 菜单的输入页面，包括添加和修改
 * Copyright:   Copyright (c) 2013
 * Company:     beiwaionline
 * @author      bfsu
 * @version     1.0
 * @see
	HISTORY
    *  2013-08-08 bfsu Create File
    *  2013-08-013 fujin 优化页面
**************************************************/
-->
<#include "/view/templates/ace/ace-inc.ftl">
<@input url="${base}/components/security/menu/save">
    <input type="hidden" name="id" value="${menu.id!''}"/>
	<@formgroup title='名称'><input type="text" name="title" value="${menu.title!''}" check-type="required"></@formgroup>
	<@formgroup title='描述'><textarea class='form-control' name="description" value="${menu.description!''}"  >${menu.description!''}</textarea></@formgroup>
	
		<#if parent?? && parent.id?length gt 0>
		<@formgroup title='父菜单'>
		<input type="hidden" name="parentId" value="${parent.id?c}" />
		${parent.title!''}
		</@formgroup>
		</#if>
	
	<@formgroup title='对应权限'>
	<div>
	   <!-- 遍历列表并连接元素 -->
       <#list privileges as item>
          ${item}<#if item_has_next>, </#if>
       </#list>
    </div>

		<@select name="privilegeCode" value="${menu.privilegeCode!''}" list=privileges listKey='title' listValue='code' sortBy='title'/>
		
	</@formgroup>
	<@formgroup title='排序序号'><input type="text" name="orderSn" value="${menu.orderSn?exists?then(menu.orderSn?c, '')}" check-type='required' ></@formgroup>

</@input>